Move the call to gtk_text_view_end_selection_drag() from
authorMatthias Clasen <mclasen@redhat.com>
Tue, 28 Mar 2006 16:01:11 +0000 (16:01 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 28 Mar 2006 16:01:11 +0000 (16:01 +0000)
2006-03-28  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtktextview.c (gtk_text_view_do_popup)
(gtk_text_view_grab_notify): Move the call to
gtk_text_view_end_selection_drag() from gtk_text_view_do_popup
to gtk_text_view_grab_notify, so that it works not only
for the text views own popup, but also for other ways in which
we might become grab-shadowed during a selection drag.
(#74620, Li Yuan)

ChangeLog
ChangeLog.pre-2-10
gtk/gtktextview.c

index cd7934b1607dac3428bea85a858f4c4f4f7d0e7d..edae51657137949b039f6d36e9b949975c11da44 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-03-28  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_do_popup) 
+       (gtk_text_view_grab_notify): Move the call to 
+       gtk_text_view_end_selection_drag() from gtk_text_view_do_popup
+       to gtk_text_view_grab_notify, so that it works not only
+       for the text views own popup, but also for other ways in which
+       we might become grab-shadowed during a selection drag.
+       (#74620, Li Yuan)
+       
 2006-03-28  Sven Herzberg  <herzi@gnome-de.org>
 
         reviewed by: Tim Janik
index cd7934b1607dac3428bea85a858f4c4f4f7d0e7d..edae51657137949b039f6d36e9b949975c11da44 100644 (file)
@@ -1,3 +1,13 @@
+2006-03-28  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_do_popup) 
+       (gtk_text_view_grab_notify): Move the call to 
+       gtk_text_view_end_selection_drag() from gtk_text_view_do_popup
+       to gtk_text_view_grab_notify, so that it works not only
+       for the text views own popup, but also for other ways in which
+       we might become grab-shadowed during a selection drag.
+       (#74620, Li Yuan)
+       
 2006-03-28  Sven Herzberg  <herzi@gnome-de.org>
 
         reviewed by: Tim Janik
index b338955fd1692411944918cce23637be9427d7a1..2d1ec400cba887dfd932dbb6e3f5612ac0a7e49c 100644 (file)
@@ -3720,7 +3720,10 @@ gtk_text_view_grab_notify (GtkWidget *widget,
                           gboolean   was_grabbed)
 {
   if (!was_grabbed)
-    gtk_text_view_unobscure_mouse_cursor (GTK_TEXT_VIEW (widget));
+    {
+      gtk_text_view_end_selection_drag (GTK_TEXT_VIEW (widget), NULL);
+      gtk_text_view_unobscure_mouse_cursor (GTK_TEXT_VIEW (widget));
+    }
 }
 
 
@@ -7314,9 +7317,6 @@ gtk_text_view_do_popup (GtkTextView    *text_view,
 {
   PopupInfo *info = g_new (PopupInfo, 1);
 
-  /* should not need this, see http://bugzilla.gnome.org/show_bug.cgi?id=74620 */
-  gtk_text_view_end_selection_drag (text_view, event);
-  
   /* In order to know what entries we should make sensitive, we
    * ask for the current targets of the clipboard, and when
    * we get them, then we actually pop up the menu.